﻿<UserControl x:Class="TraceView.UI.TraceViewer"
             x:Name="TraceViewerControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:transitionals="clr-namespace:Transitionals.Controls;assembly=Transitionals"
             xmlns:entities="clr-namespace:TraceView.UI.Entities"
             xmlns:controls="clr-namespace:TraceView.UI.CustomControls"
             xmlns:ui="clr-namespace:TraceView.UI"
             mc:Ignorable="d"
             d:DesignHeight="600"
             d:DesignWidth="800"
             Loaded="OnLoaded"
             Unloaded="OnUnloaded">
	<UserControl.Resources>
		<!--Deselect Data Template-->
		<DataTemplate x:Key="ItemTemplate"
		              DataType="{x:Type entities:TraceItem}">
			<Border Background="Transparent"
			        x:Name="mainBr"
			        Padding="5,5,5,10">
				<Border Background="{StaticResource BlackGradientBrush}"
                        BorderThickness=".7"
				        BorderBrush="{Binding Severity, Converter={ui:SeverityToSelectedItemBrushConverter}}">
					<Grid>
						<Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
							<ColumnDefinition Width="*"/>
							<ColumnDefinition Width="Auto"/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="Auto"/>
							<RowDefinition/>
						</Grid.RowDefinitions>
                        <Rectangle Visibility="Collapsed" Fill="{Binding Severity, Converter={ui:SeverityToSelectedItemBrushConverter}}" Grid.RowSpan="3"/>
						<ContentControl Content="{Binding View,Converter={ui:DummyConverter}}"
						                x:Name="HandlerView"
						                Grid.Row="2"
                                        Grid.Column="1"
						                Grid.ColumnSpan="2"/>
						<TextBlock Foreground="Wheat"
						           Margin="10,0,10,0"
                                    Grid.Column="1"
						           Grid.ColumnSpan="2"
						           TextWrapping="Wrap"
						           Text="{Binding Categories,Converter={ui:CategoryStringBuilder}}"/>
						<TextBlock FontWeight="Thin"
						           FontSize="10"
						           Grid.Row="1"
                                    Grid.Column="1"
						           Grid.ColumnSpan="2"
						           VerticalAlignment="Bottom"
						           HorizontalAlignment="Left"
						           Margin="10,5,5,0"
						           Foreground="Gray">
							<Run Text="{Binding TimeStamp, StringFormat='{}{0:t}'}"/>
							<Run Text="via"/>
							<Run Text="{Binding Source}"/>
						</TextBlock>
						<Border x:Name="brActions"
						        Grid.Column="2"
						        Grid.RowSpan="2"
						        Padding="2"
						        VerticalAlignment="Top"
						        HorizontalAlignment="Right">
							<StackPanel Orientation="Horizontal">
								<controls:ImageButton DefaultImageSource="{StaticResource LaunchDetailW}"
								                      Click="OnLaunchDetailsClick"
								                      x:Name="btnLaunchDetails"
								                      Visibility="Collapsed"
								                      MouseOverImageSource="{StaticResource LaunchDetailW}"
								                      Margin="0,0,4,0"/>
								<controls:ImageButton DefaultImageSource="{StaticResource CopyW}"
								                      MouseOverImageSource="{StaticResource CopyW}"
								                      x:Name="btnCopy"
                                                       Click="OnBtnCopyClick"
								                      Visibility="Collapsed"
								                      Margin="0,0,4,0"/>
								<controls:ImageButton DefaultImageSource="{StaticResource DeleteItemW}"
								                      MouseOverImageSource="{StaticResource DeleteItemW}"
								                      x:Name="btnDelete"
								                      Click="BtnDeleteClick"
								                      Visibility="Collapsed"
								                      Margin="0,0,4,0"/>
								<controls:ImageToggleButton DefaultImageSource="{StaticResource PinW}"
								                            MouseOverImageSource="{StaticResource UnPinW}"
								                            IsChecked="{Binding IsPinned,Mode=TwoWay}"
								                            x:Name="btnPin"
								                            Margin="0,0,4,0">
									<controls:ImageToggleButton.Visibility>
										<MultiBinding Converter="{ui:MultiVisibilityAnyConverter}">
											<Binding ElementName="mainBr"
											         Path="IsMouseOver"
											         Converter="{ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}"/>
											<Binding Path="IsPinned"
											         Converter="{ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}"/>
										</MultiBinding>
									</controls:ImageToggleButton.Visibility>
								</controls:ImageToggleButton>
							</StackPanel>
						</Border>
					</Grid>
				</Border>
			</Border>
			<DataTemplate.Triggers>
				<Trigger Property="IsMouseOver"
				         Value="True">
					<Setter Property="Visibility"
					        Value="Visible"
					        TargetName="btnLaunchDetails"/>
					<Setter Property="Visibility"
					        Value="Visible"
					        TargetName="btnCopy"/>
					<Setter Property="Visibility"
					        Value="Visible"
					        TargetName="btnDelete"/>
				</Trigger>
			</DataTemplate.Triggers>

		</DataTemplate>
		<!--Selected Item Data Template-->
		<DataTemplate x:Key="SelectedTemplate"
		              DataType="{x:Type entities:TraceItem}">
			<Border Background="Transparent"
			        BorderBrush="{StaticResource MetroWhite}"
			        Padding="5,5,5,10"
			        BorderThickness="0,0,0,0">
				<Border Background="{Binding Severity, Converter={ui:SeverityToSelectedItemBrushConverter}}">
					<Grid>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="*"/>
							<ColumnDefinition Width="Auto"/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="Auto"/>
							<RowDefinition/>
						</Grid.RowDefinitions>
						<ContentControl Content="{Binding View}"
						                Grid.Row="3"
						                Grid.ColumnSpan="2"
						                Foreground="{Binding Severity,Converter={ui:SeverityToSelectedItemTextBrush}}"
						                FontWeight="SemiBold"/>
						<StackPanel Orientation="Horizontal"
						            Grid.ColumnSpan="2">
							<TextBlock FontWeight="Regular"
							           FontSize="17"
							           Margin="10,0,10,0"
							           TextWrapping="Wrap"
							           Foreground="{Binding Severity,Converter={ui:SeverityToSelectedItemTextBrush}}"
							           Text="{Binding Categories,Converter={ui:CategoryStringBuilder}}"/>
						</StackPanel>

						<TextBlock FontWeight="UltraLight"
						           FontSize="14"
						           Grid.Row="1"
						           Grid.ColumnSpan="2"
						           VerticalAlignment="Bottom"
						           HorizontalAlignment="Left"
						           Margin="10,5,5,0"
						           Foreground="{Binding Severity,Converter={ui:SeverityToSelectedItemTextBrush}}">
							<Run Text="{Binding TimeStamp, StringFormat='{}{0:t}'}"/>
							<Run Text="via"/>
							<Run Text="{Binding Source}"/>
						</TextBlock>
						<Border x:Name="brActions"
						        Grid.Column="1"
						        Grid.RowSpan="2"
						        Margin="5"
						        VerticalAlignment="Top"
						        HorizontalAlignment="Right">
							<StackPanel Orientation="Horizontal">

								<controls:ImageButton DefaultImageSource="{Binding Severity,Converter={ui:SeverityToImageConverter Name=LaunchDetail}}"
								                      Click="OnLaunchDetailsClick"
								                      MouseOverImageSource="{Binding Severity,Converter={ui:SeverityToImageConverter Name=LaunchDetail}}"
								                      Margin="0,2,2,2"/>
								<controls:ImageButton DefaultImageSource="{Binding Severity,Converter={ui:SeverityToImageConverter Name=Copy}}"
								                      MouseOverImageSource="{Binding Severity,Converter={ui:SeverityToImageConverter Name=Copy}}"
                                                      Click="OnBtnCopyClick"
								                      Margin="0,2,2,2"/>
								<controls:ImageButton DefaultImageSource="{Binding Severity,Converter={ui:SeverityToImageConverter Name=DeleteItem}}"
								                      MouseOverImageSource="{Binding Severity,Converter={ui:SeverityToImageConverter Name=DeleteItem}}"
                                                      Click="BtnDeleteClick"
								                      Margin="0,2,2,2"/>
								<controls:ImageToggleButton DefaultImageSource="{Binding Severity,Converter={ui:SeverityToImageConverter Name=Pin}}"
								                            MouseOverImageSource="{Binding Severity,Converter={ui:SeverityToImageConverter Name=UnPin}}"
								                            IsChecked="{Binding IsPinned,Mode=TwoWay}"
								                            Margin="0,2,2,2"/>                                
							</StackPanel>
						</Border>
					</Grid>
				</Border>
			</Border>
			<!--<DataTemplate.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Visibility" Value="Visible" TargetName="brActions"/>
                </Trigger>
            </DataTemplate.Triggers>-->
		</DataTemplate>       
        <!--Details item Data Template-->
		<DataTemplate x:Key="DetailsTemplate"
		              DataType="{x:Type entities:TraceItem}">
			<Border BorderBrush="{StaticResource MetroWhite}"
			        Margin="10,0,10,10">
				<Grid>
					<Grid.RowDefinitions>
						<RowDefinition Height="55"/>
						<RowDefinition Height="*"/>
					</Grid.RowDefinitions>
					<Border Background="{Binding Severity, Converter={ui:SeverityToSelectedItemBrushConverter}}"
					        CornerRadius="0,0,0,0">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <StackPanel Orientation="Vertical"
						            HorizontalAlignment="Left"
						            VerticalAlignment="Top">
                                <TextBlock FontWeight="SemiBold"
							           FontSize="20"
							           Margin="10,0,10,0"
							           TextWrapping="Wrap"
							           Foreground="{Binding Severity,Converter={ui:SeverityToSelectedItemTextBrush}}"
							           Text="{Binding Categories,Converter={ui:CategoryStringBuilder}}"/>
                                <TextBlock FontWeight="Regular"
							           FontSize="16"
							           Margin="10,5,5,10"
							           Foreground="{Binding Severity,Converter={ui:SeverityToSelectedItemTextBrush}}">
								<Run Text="{Binding TimeStamp, StringFormat='{}{0:t}'}"/>
								<Run Text="via"/>
								<Run Text="{Binding Source}"/>
								<Run Text="("/>
								<Run Text="{Binding UserName}"/>
								<Run Text=")"/>
                                </TextBlock>
                            </StackPanel>
                            <Grid Grid.Column="1"
			                  Margin="10,5,5,0"
                              HorizontalAlignment="Right"
			                  VerticalAlignment="Top">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <controls:ImageToggleButton DefaultImageSource="{Binding Severity,Converter={ui:SeverityToImageConverter Name=Pin}}"
				                      MouseOverImageSource="{Binding Severity,Converter={ui:SeverityToImageConverter Name=UnPin}}"                                     
				                      Margin="5"
                                      IsChecked="{Binding IsPinned,Mode=TwoWay}"
				                      x:Name="PinButton"/>
                                <TextBlock FontSize="12"
				          Foreground="{Binding Severity,Converter={ui:SeverityToSelectedItemTextBrush}}"
				           Text="pin"
				           Grid.Row="1"
				           HorizontalAlignment="Center"
				           Visibility="{Binding IsMouseOver,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Hidden},ElementName=PinButton}"/>
                                <controls:ImageButton DefaultImageSource="{Binding Severity,Converter={ui:SeverityToImageConverter Name=Copy}}"
				                      MouseOverImageSource="{Binding Severity,Converter={ui:SeverityToImageConverter Name=Copy}}"
				                      x:Name="CopyButton"
                                                      Click="OnBtnCopyClick"
				                      Margin="5"
				                      Grid.Column="1"/>
                                <TextBlock FontSize="12"
				           Text="copy"
				           Grid.Row="1"
				           Grid.Column="1"
				           HorizontalAlignment="Center"
				          Foreground="{Binding Severity,Converter={ui:SeverityToSelectedItemTextBrush}}"
				           Visibility="{Binding IsMouseOver,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Hidden},ElementName=CopyButton}"/>
                                <controls:ImageButton DefaultImageSource="{StaticResource EmailLW}"
				                      MouseOverImageSource="{StaticResource EmailLW}"
				                      x:Name="EmailButton"
                                      Visibility="Collapsed"
				                      Margin="5"
				                      Grid.Column="2"/>
                                <TextBlock FontSize="12"
				           HorizontalAlignment="Center"
				           Text="email"
				           Grid.Row="1"
				           Grid.Column="2"
				           Foreground="{Binding Severity,Converter={ui:SeverityToSelectedItemTextBrush}}"
				           Visibility="Collapsed"/>

                                <controls:ImageButton DefaultImageSource="{Binding Severity,Converter={ui:SeverityToImageConverter Name=Print}}"
				                      MouseOverImageSource="{Binding Severity,Converter={ui:SeverityToImageConverter Name=Print}}"
				                      x:Name="PrintButton"
                                      Click="OnBtnPrintClick"
				                      Margin="5"
				                      Grid.Column="3"/>
                                <TextBlock FontSize="12"
				           Foreground="{Binding Severity,Converter={ui:SeverityToSelectedItemTextBrush}}"
				           HorizontalAlignment="Center"
				           Text="print"
				           Grid.Row="1"
				           Grid.Column="3"
				           Visibility="{Binding IsMouseOver,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Hidden},ElementName=PrintButton}"/>
                                <controls:ImageButton DefaultImageSource="{Binding Severity,Converter={ui:SeverityToImageConverter Name=DeleteItem}}"
				                      MouseOverImageSource="{Binding Severity,Converter={ui:SeverityToImageConverter Name=DeleteItem}}"
				                      Margin="5"
				                      x:Name="DeleteButton"
                                                      Click="BtnDeleteClick"
				                      Grid.Column="4"/>
                                <TextBlock FontSize="12"
				           Text="delete"
				           Grid.Column="4"
				           Grid.Row="1"
				           Foreground="{Binding Severity,Converter={ui:SeverityToSelectedItemTextBrush}}"
				           Visibility="{Binding IsMouseOver,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Hidden},ElementName=DeleteButton}"/>

                            </Grid>
                        </Grid>
						
                    </Border>
					<Border Grid.Row="1"
					        Margin="0"
					        VerticalAlignment="Stretch"
					        HorizontalAlignment="Stretch"
					        Background="Transparent"
					        BorderBrush="{Binding Severity, Converter={ui:SeverityToSelectedItemBrushConverter}}"
					        BorderThickness=".7,0,.7,.7">
						<ScrollViewer>
							<ContentControl Content="{Binding View}"
							                Grid.Row="3"
							                VerticalAlignment="Top"
							                Grid.ColumnSpan="2"
							                Foreground="{StaticResource MetroWhite}"
							                FontWeight="DemiBold"/>
						</ScrollViewer>
					</Border>
				</Grid>
			</Border>
		</DataTemplate>
		<!--Application DataTemplate-->
		<DataTemplate DataType="{x:Type entities:ApplicationInfo}" x:Key="appItem">           
                <StackPanel Orientation="Horizontal" Margin="5">
			    <TextBlock Text="{Binding ApplicationName}"
                       HorizontalAlignment="Left"
                       VerticalAlignment="Center"/>
                <TextBlock Visibility="{Binding NewItemsCount,Converter={ui:CountToVisibilityConverter TrueMapsTo=Collapsed, FalseMapsTo=Visible},ConverterParameter=0}"
                           HorizontalAlignment="Left"
                           FontSize="20"
                           VerticalAlignment="Center">
                    <Run Text="("/>
                    <Run Text="{Binding NewItemsCount}" Foreground="Red" FontWeight="SemiBold"/>
                    <Run Text=")"/>
                </TextBlock>
                </StackPanel>         
        </DataTemplate>
		<!--Application List Style-->
		<Style x:Key="ApplicationItem"
		       TargetType="{x:Type ListBoxItem}">
			<Style.Resources>
				<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"
				                 Color="Transparent"/>
				<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}"
				                 Color="Transparent"/>
			</Style.Resources>
			<Setter Property="Foreground"
			        Value="{StaticResource MetroGray}"/>
            <Setter Property="ContentTemplate"
			        Value="{StaticResource appItem}"/>
			<Setter Property="FontSize"
			        Value="25"/>
			<Setter Property="FontWeight"
			        Value="ExtraLight"/>           
            <Setter Property="HorizontalContentAlignment"
			        Value="Stretch"/>
			<Style.Triggers>
				<Trigger Property="IsMouseOver"
				         Value="True">
                    <Setter Property="Foreground"
			        Value="{StaticResource MetroWhite}"/>
                    <Setter Property="FontSize"
					        Value="25"/>                   
					<Setter Property="FontWeight"
					        Value="ExtraLight"/>
				</Trigger>
				<Trigger Property="IsSelected"
				         Value="True">
                    <Setter Property="Foreground"
			        Value="{StaticResource MetroWhite}"/>
                    <Setter Property="FontSize"
					        Value="25"/>                    
					<Setter Property="FontWeight"
					        Value="ExtraLight"/>
				</Trigger>

			</Style.Triggers>
		</Style>
		<!--ListBox Item -->
		<Style TargetType="{x:Type ListBoxItem}"
		       x:Key="ContainerStyle">
			<Style.Resources>
				<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"
				                 Color="Transparent"/>
				<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}"
				                 Color="Transparent"/>
			</Style.Resources>
			<Setter Property="ContentTemplate"
			        Value="{StaticResource ItemTemplate}"/>
			<Setter Property="HorizontalContentAlignment"
			        Value="Stretch"/>
			<Setter Property="Margin"
			        Value="0"/>
			<Setter Property="Foreground"
			        Value="{StaticResource MetroWhite}"/>
			<Style.Triggers>
				<Trigger Property="IsSelected"
				         Value="True">
					<Setter Property="ContentTemplate"
					        Value="{StaticResource SelectedTemplate}"/>
				</Trigger>
			</Style.Triggers>
		</Style>       
        <!--FilterList Item Style-->
		<Style TargetType="{x:Type ListBoxItem}"
		       x:Key="FilterListContainerStyle">
			<Style.Resources>
				<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"
				                 Color="Transparent"/>
				<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}"
				                 Color="Transparent"/>
			</Style.Resources>
		</Style>
		<!--Users DataTemplate-->
		<DataTemplate DataType="{x:Type entities:UserInfo}">
			<CheckBox Content="{Binding Name}"
			          ToolTip="{Binding MachineName}"
			          IsChecked="{Binding IsChecked}"/>
		</DataTemplate>
		<!--Severity DataTemplate-->
		<DataTemplate DataType="{x:Type entities:SeverityInfo}">
			<CheckBox Content="{Binding Severity}"
			          IsChecked="{Binding IsChecked}"/>
		</DataTemplate>
		<!--Categorties DataTemplate-->
		<DataTemplate DataType="{x:Type entities:CategoryInfo}">
			<CheckBox Content="{Binding Category}"
			          IsChecked="{Binding IsChecked}"/>
		</DataTemplate>
        <Style TargetType="{x:Type Hyperlink}">
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Foreground" Value="{StaticResource brandBrush}" />
                </Trigger>
            </Style.Triggers>
            <Setter Property="Foreground" Value="{StaticResource MetroWhite}" />
            <!--<Setter Property="TextBlock.TextDecorations" Value="{x:Null}" />-->
        </Style>
        
        <!--Data template for profile in profiles list-->
        <DataTemplate DataType="{x:Type entities:Profile}">
            <Grid Margin="0,10,0,10">
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="6"/>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Rectangle Grid.RowSpan="2" Fill="{StaticResource brandBrush}"/>
                <TextBlock FontFamily="Segoe WP" 
                           Margin="5,0,0,0"
                           Foreground="{StaticResource MetroWhite}"
                           Grid.Column="1"
                           Text="{Binding Name}"
                           FontSize="16"/>
                <TextBlock FontFamily="Segoe WP" 
                           Foreground="{StaticResource MetroGray}"
                           Grid.Column="1"
                           Grid.Row="1"
                          Margin="5,2,2,0"
                           Text="{Binding CreationDate}"
                           FontSize="10"/>
                <CheckBox IsChecked="{Binding IsChecked,Mode=TwoWay}"
                          Grid.Column="2"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Top"/>
            </Grid>
        </DataTemplate>
        <!--DataTemplateForListnerners-->
        <DataTemplate x:Key="ListenerItemTemplate">
            <TextBlock FontFamily="Segoe WP" 
                           Foreground="{StaticResource MetroWhite}"
                           Grid.Column="1"
                           Text="{Binding Name}"
                           FontSize="16"/>
        </DataTemplate>

        <Storyboard x:Key="GrowStoryboard">
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grdWizard" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:00.0" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="brProfiles" Storyboard.TargetProperty="(FrameworkElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="0:0:00.2" Value=".7"/>
                <SplineDoubleKeyFrame KeyTime="0:0:00.3" Value=".4"/>
                <SplineDoubleKeyFrame KeyTime="0:0:00.4" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grdWizard" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:00.4" Value="{x:Static Visibility.Visible}"/>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grdWizard" Storyboard.TargetProperty="(FrameworkElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="0:0:00.4" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="brProfiles" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:00.4" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>
            <!--<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="brSaveProfile" Storyboard.TargetProperty="(FrameworkElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="0:0:00.2" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="brSaveProfile" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:00.2" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>-->
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="brYesNo" Storyboard.TargetProperty="(FrameworkElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="0:0:00.2" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="brYesNo" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:00.2" Value="{x:Static Visibility.Visible}"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="ShrinkStoryboard">           
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grdWizard" Storyboard.TargetProperty="(FrameworkElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="0:0:00.2" Value=".7"/>
                <SplineDoubleKeyFrame KeyTime="0:0:00.3" Value=".4"/>
                <SplineDoubleKeyFrame KeyTime="0:0:00.4" Value="0"/>
            </DoubleAnimationUsingKeyFrames>           
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grdWizard" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:00.4" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="brProfiles" Storyboard.TargetProperty="(FrameworkElement.Opacity)">               
                <SplineDoubleKeyFrame KeyTime="0:0:00.4" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="brProfiles" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:00.5" Value="{x:Static Visibility.Visible}"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="ShowSaveProfileStoryboard">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="brYesNo" Storyboard.TargetProperty="(FrameworkElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="0:0:00.2" Value="0"/>               
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="brYesNo" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:00.2" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="brSaveProfile" Storyboard.TargetProperty="(FrameworkElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="0:0:00.2" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="brSaveProfile" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:00.2" Value="{x:Static Visibility.Visible}"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="Button.Click" SourceName="btnAdd">
            <BeginStoryboard Storyboard="{StaticResource GrowStoryboard}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Button.Click" SourceName="CloseWizard">
            <BeginStoryboard Storyboard="{StaticResource ShrinkStoryboard}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Button.Click" SourceName="btnOk">
            <BeginStoryboard Storyboard="{StaticResource ShrinkStoryboard}"/>
        </EventTrigger>
        <!--<EventTrigger RoutedEvent="Button.Click" SourceName="btnSave">
            <BeginStoryboard Storyboard="{StaticResource ShrinkStoryboard}"/>
        </EventTrigger>-->
        <!--<EventTrigger RoutedEvent="Button.Click" SourceName="btnCancel">
            <BeginStoryboard Storyboard="{StaticResource ShrinkStoryboard}"/>
        </EventTrigger>-->
        <!--<EventTrigger RoutedEvent="Button.Click" SourceName="btnOk">
            <BeginStoryboard Storyboard="{StaticResource ShowSaveProfileStoryboard}"/>
        </EventTrigger>-->
    </UserControl.Triggers>
	<Grid Name="grdContainer"
	      DataContext="{Binding ElementName=TraceViewerControl}">
		<Grid>
			<Grid.Background>
				<RadialGradientBrush>
					<GradientStop Color="Black" 
					              Offset="1"/>
					<GradientStop Color="{Binding ElementName=Slider, Path=SelectedColour,FallbackValue=Black}"
					              Offset="0.009"/>
				</RadialGradientBrush>
			</Grid.Background>
		</Grid>
		<transitionals:TransitionElement x:Name="Container"
		                                 Content="{Binding CurrentView, ElementName=TraceViewerControl}"/>
		<Grid Name="grdMainView"
		      Background="Transparent">
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto"/>
				<RowDefinition/>
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="2*"/>
				<ColumnDefinition Width="Auto"/>
			</Grid.ColumnDefinitions>
			<Grid Grid.Column="1">
				<Grid.RowDefinitions>
					<RowDefinition Height="15"/>
					<RowDefinition Height="*"/>
					<RowDefinition Height="Auto"/>
				</Grid.RowDefinitions>
				<StackPanel VerticalAlignment="Top"
				            Orientation="Horizontal"
				            Margin="0"
				            HorizontalAlignment="Right">
					<TextBlock Text="{Binding StatusText}"
					           FontWeight="Light"
					           FontSize="12"
					           Margin="0,0,2,2"
					           VerticalAlignment="Center"
					           Visibility="{Binding IsMouseOver,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed},ElementName=ServerStatus}"
					           Foreground="{StaticResource MetroWhite}"/>
					<Image Width="14"
					       Height="14"
					       Margin="0,0,4,2"
					       x:Name="ServerStatus"
					       Source="{Binding ServerImage}"/>
				</StackPanel>
				<StackPanel Orientation="Horizontal"
				            Background="Transparent"
				            Grid.Row="1"
				            Margin="0"
				            x:Name="brandNameStack"
				            VerticalAlignment="Top"
				            HorizontalAlignment="Left">
					<TextBlock Text="trace"
					           Margin="0"
					           Padding="0"
					           Foreground="DarkGray"
					           FontWeight="UltraLight"
					           FontSize="60"/>
					<TextBlock Text="view"
					           Margin="0"
					           Padding="0"
					           Foreground="{StaticResource brandBrush}"
					           FontWeight="Thin"
					           FontSize="60"/>
					<TextBlock Text="beta"
					           Margin="0"
					           Padding="0,15,0,0"
					           HorizontalAlignment="Left"
					           Foreground="DarkGray"
					           FontWeight="UltraLight"
					           FontSize="12"/>
				</StackPanel>
				<StackPanel Orientation="Horizontal"
				            HorizontalAlignment="Left"
				            Grid.Row="2"
				            Grid.Column="1"
				            Margin="5,0,30,5"
				            VerticalAlignment="Center">
					<TextBox Width="250"
					         Height="25"
					         TextWrapping="WrapWithOverflow"
					         BorderBrush="{StaticResource MetroWhite}"
					         Text="{Binding SearchString,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
					         BorderThickness=".5"
					         Foreground="White"
                             KeyDown="OnKeyPress"
					         Background="Transparent"
					         SelectionBrush="#FFFF7201"
					         CaretBrush="White"/>
					<controls:ImageButton DefaultImageSource="{StaticResource Search_G}"
					                      MouseOverImageSource="{StaticResource Search_W}"
                                          Click="OnBtnSearchClick"
					                      Margin="0"/>
				</StackPanel>
			</Grid>
			<Grid Grid.RowSpan="2">
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="*"/>
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto"/>
					<ColumnDefinition/>
				</Grid.ColumnDefinitions>
				<Grid HorizontalAlignment="Right"
				      Grid.ColumnSpan="2"
				      VerticalAlignment="Top">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="Auto"/>
						<ColumnDefinition Width="Auto"/>
						<ColumnDefinition Width="Auto"/>
						<ColumnDefinition Width="Auto"/>
						<ColumnDefinition Width="Auto"/>
					</Grid.ColumnDefinitions>
					<Button Content="SETTINGS"
					        Click="OnBtnSettingsClick"
					        FontSize="10"/>
					<TextBlock Text="|"
					           Padding="0,5,0,0"
					           Margin="0"
					           Grid.Column="1"
					           Foreground="{StaticResource MetroWhite}"
					           FontSize="9"/>
					<Button Content="HELP"
					        Grid.Column="2"
					        FontSize="10"/>
					<TextBlock Text="|"
					           Padding="0,5,0,0"
					           Margin="0"
					           Grid.Column="3"
					           Foreground="{StaticResource MetroWhite}"
					           FontSize="9"/>
					<Button Content="ABOUT"
					        Grid.Column="4"
					        Click="ButtonAboutClick"
					        FontSize="10"/>
				</Grid>
				<TextBlock Text="{Binding SelectedItem.ApplicationName,ElementName=ApplicationStack}"
				           FontSize="80"
				           Margin="5,2,5,2"
				           FontWeight="UltraLight"
				           Grid.Row="1"
				           Grid.ColumnSpan="2"
				           VerticalAlignment="Top"
				           HorizontalAlignment="Stretch"
				           Foreground="{StaticResource MetroWhite}"/>
                <Grid Grid.Row="2"
                      Grid.ColumnSpan="2">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <TabControl x:Name="ItemStack"
				            Style="{StaticResource TabApplicationHeaders}"
				            Margin="0,5,5,5"
				            SelectionChanged="ItemStackSelectionChanged">
                        <!-- Recent items list -->
                        <TabItem x:Name="TabRecentItems"
                                 Tag="{Binding SelectedApplication.RecentItems}"
					             Header="recent"/>                        
                        <!-- Pinned items list -->
                        <TabItem x:Name="TabPinnedItems"
                                  Tag="{Binding SelectedApplication.PinnedItems}"
					             Header="pinned"/>                       
                        <TabItem x:Name="TabAllItems"
                                 Tag="{Binding SelectedApplication.AllItems}"
					             Header="everything"/>                           
                    </TabControl>
                    <Grid Grid.Row="1">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition />
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>                      
                        <StackPanel Orientation="Horizontal"
				                HorizontalAlignment="Left"				            
				                VerticalAlignment="Top">
                            <controls:ImageRadioButton DefaultImageSource="{StaticResource CircleW}"
					                        MouseOverImageSource="{StaticResource CircleO}"
					                        IsChecked="True"
					                        Margin="2"
					                        GroupName="level"
					                        Tag="1"
					                        Checked="OnItemSizeChanged"/>
                            <controls:ImageRadioButton DefaultImageSource="{StaticResource CircleW}"
					                        MouseOverImageSource="{StaticResource CircleO}"
					                        GroupName="level"
					                        Margin="2"
					                        Tag="2"
					                        Checked="OnItemSizeChanged"/>
                            <controls:ImageRadioButton DefaultImageSource="{StaticResource CircleW}"
					                        MouseOverImageSource="{StaticResource CircleO}"
					                        GroupName="level"
					                        Margin="2"
					                        Tag="3"
					                        Checked="OnItemSizeChanged"/>
                            <controls:ImageRadioButton DefaultImageSource="{StaticResource CircleW}"
					                        MouseOverImageSource="{StaticResource CircleO}"
					                        GroupName="level"
					                        Margin="2"
					                        Tag="4"
					                        Checked="OnItemSizeChanged"/>
                        </StackPanel>
                        <controls:ImageToggleButton DefaultImageSource="{StaticResource Pause}"
									                Margin="5,0,5,0"
                                                    Grid.Column="2"
                                                    x:Name="btnPause"
                                                    Checked="OnBtnPauseChecked"
                                                    Unchecked="OnBtnPauseUnChecked"                                                   
                                                    HorizontalAlignment="Right"
									                MouseOverImageSource="{StaticResource PlayW}"/>
                        <controls:ImageButton DefaultImageSource="{StaticResource Delete}"
									          Margin="5,0,10,0"
                                              Grid.Column="3"
                                              HorizontalAlignment="Right"
                                              Click="OnBtnDeleteListClick"
									          MouseOverImageSource="{StaticResource Delete}"/>                       
                    </Grid>                    
                   <ListBox x:Name="lstRecentItems"
						    Margin="10,5,10,10"
						    Background="Transparent"
						    BorderBrush="{x:Null}"
						    BorderThickness="0"
						    Grid.Row="3"
                            IsSynchronizedWithCurrentItem="True"
						    SelectionMode="Single"
						    MouseDoubleClick="OnListBoxMouseDoubleClick"
						    ScrollViewer.CanContentScroll="False"
						    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
						    ItemContainerStyle="{StaticResource ContainerStyle}"
						    ItemsSource="{Binding SelectedItem.Tag, ElementName=ItemStack}"/>
                </Grid>				
			</Grid>
			<Grid Grid.Row="1"
			      Grid.Column="1">
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto"/>
					<RowDefinition/>
				</Grid.RowDefinitions>
				<StackPanel Orientation="Horizontal"
				            Margin="25,5,5,5"
				            VerticalAlignment="Top"
				            HorizontalAlignment="Left">
					<RadioButton x:Name="btnApps"
					             Content="applications"
					             FontSize="20"
					             GroupName="MainGroups"/>
					<RadioButton x:Name="btnFilter"
					             Content="filter"
					             IsChecked="True"
					             FontSize="20"
					             GroupName="MainGroups"/>
				</StackPanel>
				<Border Grid.Row="1"
				        BorderBrush="{StaticResource BorderVerticalSeperator}"
				        Visibility="{Binding IsChecked, ElementName=btnApps,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
				        BorderThickness=".6,0,0,0"
				        Margin="20,0,5,5">
					<Border Margin="0"
					        Background="Transparent"
					        Padding="10,10,10,10"
					        BorderBrush="{StaticResource BorderHorizontalRightSeperator}"
					        BorderThickness="0,0.8,0,0">
						<ListBox x:Name="ApplicationStack"
						         Background="Transparent"
						         BorderBrush="Transparent"
						         BorderThickness="0"
						         Margin="5"
						         ScrollViewer.CanContentScroll="False"
						         ScrollViewer.HorizontalScrollBarVisibility="Auto"
						         SelectionChanged="ApplicationStackSelectionChanged"
						         SelectedItem="{Binding SelectedApplication,Mode=TwoWay}"
						         ItemsSource="{Binding Applications}"
						         ItemContainerStyle="{StaticResource ApplicationItem}"/>
					</Border>
				</Border>
				<Border Grid.Row="1"
				        Visibility="{Binding IsChecked, ElementName=btnFilter,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
				        BorderBrush="{StaticResource BorderVerticalSeperator}"
				        BorderThickness=".6,0,0,0"
				        Margin="20,0,5,5">
					<Border Margin="0"
					        Background="Transparent"
					        Padding="10,10,10,10"
					        BorderBrush="{StaticResource BorderHorizontalRightSeperator}"
					        BorderThickness="0,0.8,0,0">
						<ScrollViewer HorizontalScrollBarVisibility="Disabled">
							<Grid Grid.Row="1">
								<Grid.RowDefinitions>
									<RowDefinition Height="Auto"/>
									<RowDefinition Height="Auto"/>
									<RowDefinition Height="Auto"/>
								</Grid.RowDefinitions>
								<Expander Header="users"
								          Grid.Row="2"
								          Margin="5,5,5,5">
									<ListBox ItemsSource="{Binding Users}"
									         Background="Transparent"
									         BorderBrush="Transparent"
									         BorderThickness="0"
									         Margin="5"
									         ScrollViewer.CanContentScroll="False"
									         ScrollViewer.HorizontalScrollBarVisibility="Disabled"
									         ItemContainerStyle="{StaticResource FilterListContainerStyle}"/>
								</Expander>
								<Expander Header="severity"
								          IsExpanded="True"
								          Margin="5,5,5,5">
									<ListBox ItemsSource="{Binding Severities}"
									         Background="Transparent"
									         BorderBrush="Transparent"
									         BorderThickness="0"
									         Margin="5"
									         ScrollViewer.CanContentScroll="False"
									         ScrollViewer.HorizontalScrollBarVisibility="Disabled"
									         ItemContainerStyle="{StaticResource FilterListContainerStyle}"/>
								</Expander>
								<Expander Header="category"
								          Grid.Row="1"
								          Margin="5,5,5,5">
									<ListBox ItemsSource="{Binding Categories}"
									         Background="Transparent"
									         Margin="5"
									         BorderBrush="Transparent"
									         BorderThickness="0"
									         ScrollViewer.CanContentScroll="False"
									         ScrollViewer.HorizontalScrollBarVisibility="Disabled"
									         ItemContainerStyle="{StaticResource FilterListContainerStyle}"/>
								</Expander>
							</Grid>
						</ScrollViewer>
					</Border>
				</Border>
			</Grid>
		</Grid>
		<Grid Name="grdDetailView"
		      Background="Transparent">
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto"/>
				<RowDefinition/>
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto"/>
				<ColumnDefinition/>
			</Grid.ColumnDefinitions>
			<controls:ImageButton HorizontalAlignment="Left"
			                      VerticalAlignment="Bottom"
			                      Margin="5,4,5,5"
			                      Width="40"
			                      Height="40"
			                      Grid.Row="0"
			                      Click="OnBtnBackClicked"
			                      DefaultImageSource="{StaticResource Back}"
			                      MouseOverImageSource="{StaticResource Back}"/>
			
			<ContentControl Grid.Row="1"
			                Content="{Binding SelectedTraceItem}"
			                ContentTemplate="{StaticResource DetailsTemplate}"
			                Grid.Column="1"/>
		</Grid>
		<Grid x:Name="grdHomePage"
		      Background="Transparent">
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto"/>
				<RowDefinition/>
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="2*"/>
				<ColumnDefinition Width="Auto"/>
			</Grid.ColumnDefinitions>
			<Grid Grid.Column="1">
				<Grid.RowDefinitions>
					<RowDefinition Height="15"/>
					<RowDefinition Height="*"/>
					<RowDefinition Height="Auto"/>
				</Grid.RowDefinitions>
				<StackPanel VerticalAlignment="Top"
				            Orientation="Horizontal"
				            Margin="0"
				            HorizontalAlignment="Right">
					<TextBlock Text="server started"
					           FontWeight="Light"
					           FontSize="12"
					           Margin="0,0,2,2"
					           VerticalAlignment="Center"
					           Visibility="{Binding IsMouseOver,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed},ElementName=ServerStatusHPage}"
					           Foreground="{StaticResource MetroWhite}"/>
					<Image Width="14"
					       Height="14"
					       Margin="0,0,4,2"
					       x:Name="ServerStatusHPage"
					       Source="{StaticResource Green}"/>
				</StackPanel>
				<StackPanel Orientation="Horizontal"
				            Background="Transparent"
				            Grid.Row="1"
				            Margin="0,0,0,0"
				            Width="330"
				            VerticalAlignment="Top"
				            HorizontalAlignment="Left">
					<TextBlock Text="trace"
					           Margin="0"
					           Padding="0"
					           Foreground="DarkGray"
					           FontWeight="UltraLight"
					           FontSize="60"/>
					<TextBlock Text="view"
					           Margin="0"
					           Padding="0"
					           Foreground="{StaticResource brandBrush}"
					           FontWeight="Thin"
					           FontSize="60"/>
					<TextBlock Text="beta"
					           Margin="0"
					           Padding="0,15,0,0"
					           HorizontalAlignment="Left"
					           Foreground="DarkGray"
					           FontWeight="UltraLight"
					           FontSize="12"/>
				</StackPanel>
			</Grid>
			<Border>
				<Grid HorizontalAlignment="Right"
				      VerticalAlignment="Top">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="Auto"/>
						<ColumnDefinition Width="Auto"/>
						<ColumnDefinition Width="Auto"/>
					</Grid.ColumnDefinitions>
					<Button Content="SETTINGS"
					        Click="OnBtnSettingsClick"
					        FontSize="10"/>
					<TextBlock Text="|"
					           Padding="0,5,0,0"
					           Margin="0"
					           Grid.Column="1"
					           Foreground="{StaticResource MetroWhite}"
					           FontSize="9"/>
					<Button Content="HELP"
					        Grid.Column="2"
					        FontSize="10"/>
				</Grid>
			</Border>
			<controls:ImageButton HorizontalAlignment="Left"
			                      VerticalAlignment="Top"
			                      Margin="5,4,5,5"
			                      Width="40"
			                      Height="40"
			                      Grid.Row="0"
			                      Click="OnBtnAboutBackClicked"
			                      Visibility="{Binding CanNavigateToMainPage,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
			                      DefaultImageSource="{StaticResource Back}"
			                      MouseOverImageSource="{StaticResource Back}"/>
			<Grid Grid.Row="1"
			      Grid.ColumnSpan="2">
				<Grid.RowDefinitions>
					<RowDefinition Height="80"/>
					<RowDefinition/>
				</Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal">
                    <Viewbox Width="35" 
                             Height="35"
                             Margin="5,5,0,0"
                             HorizontalAlignment="Center"
                             VerticalAlignment="Center">
                    <controls:Spinner   Visibility="{Binding CanNavigateToMainPage,ConverterParameter=a,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Collapsed,FalseMapsTo=Visible}}"/>
                    </Viewbox>
                    <TextBlock Text="waiting for applications to initiate tracing..."
				           Margin="10"
				           HorizontalAlignment="Left"
                           VerticalAlignment="Center"
				           TextWrapping="Wrap"
				           Visibility="{Binding CanNavigateToMainPage,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Collapsed,FalseMapsTo=Visible}}"
				           Foreground="{StaticResource MetroGray}"
				           FontSize="45"
				           FontWeight="Light"/>
                </StackPanel>
				
				<ScrollViewer Grid.Row="1"
				              Margin="10"
				              HorizontalScrollBarVisibility="Disabled">
					<Grid>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="Auto"/>
							<ColumnDefinition/>
						</Grid.ColumnDefinitions>
						<StackPanel Margin="10,120,10,0"
						            VerticalAlignment="Top"
						            HorizontalAlignment="Left">
							<Border HorizontalAlignment="Center"
							        VerticalAlignment="Center"
							        BorderBrush="Transparent"
							        BorderThickness="0">
								<Image Source="{StaticResource MainScreen}"
								       Width="300"
								       Height="175"
								       Stretch="Fill"
								       x:Name="MyMainScreen">
									<Image.RenderTransform>
										<SkewTransform CenterX="0"
										               CenterY="0"
										               AngleX="0"
										               AngleY="-10"/>
									</Image.RenderTransform>
								</Image>
							</Border>
							<Border Width="300"
							        Height="170"
							        BorderBrush="Transparent"
							        BorderThickness="0"
							        Margin="0,2,0,-20">
								<Border.Background>
									<VisualBrush Visual="{Binding ElementName=MyMainScreen}">
										<VisualBrush.Transform>
											<ScaleTransform ScaleX="1"
											                ScaleY="-1"
											                CenterX="300"
											                CenterY="85">
											</ScaleTransform>
										</VisualBrush.Transform>
									</VisualBrush>
								</Border.Background>
								<Border.OpacityMask>
									<LinearGradientBrush StartPoint="0,0"
									                     EndPoint="0,1">
										<GradientStop Offset="0"
										              Color="Black">
										</GradientStop>
										<GradientStop Offset="0.6"
										              Color="Transparent">
										</GradientStop>
									</LinearGradientBrush>
								</Border.OpacityMask>
								<Border.RenderTransform>
									<SkewTransform CenterX="0"
									               CenterY="0"
									               AngleX="0"
									               AngleY="-17"/>
								</Border.RenderTransform>
							</Border>
						</StackPanel>
						<Grid Grid.Column="1">
							<Grid.RowDefinitions>
								<RowDefinition Height="Auto"/>
								<RowDefinition/>
							</Grid.RowDefinitions>
							<StackPanel Orientation="Horizontal"
							            HorizontalAlignment="Right">
								<RadioButton Content="about"
								             FontWeight="ExtraLight"
								             GroupName="home"
								             x:Name="about"
								             IsChecked="True"
								             Margin="0,5,10,5"
								             FontSize="25"/>
								<RadioButton Content="license"
								             x:Name="license"
								             FontWeight="ExtraLight"
								             GroupName="home"
								             FontSize="25"/>
							</StackPanel>
                            <Border Grid.Row="1"
							        x:Name="brAbout"
							        Visibility="{Binding IsChecked, ElementName=about,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}">
                                <Grid Margin="5,20,5,5">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="10"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="10"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="10"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="10"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition/>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Foreground="{StaticResource MetroGray}"										      
										       Margin="0,0,10,0"
										       Text="authors"/>
                                    <TextBlock Foreground="{StaticResource MetroWhite}"
										       Grid.Column="1"
										       Text="Hariharan , Jeevan"/>
                                    <TextBlock Foreground="{StaticResource MetroGray}"
										       Margin="0,0,10,0"
                                               Grid.Row="2"
										       Text="version"/>
                                    <TextBlock Foreground="{StaticResource MetroWhite}"
                                               Grid.Row="2"
                                               Grid.Column="1"
										       Text="beta testing"/>
                                    <TextBlock Foreground="{StaticResource MetroGray}"
										       Margin="0,0,10,0"
                                               Grid.Row="4"
										       Text="link"/>
                                    <TextBlock Grid.Row="4" Grid.Column="1">										
                                        <Hyperlink NavigateUri="http://traceview.codeplex.com"
                                                   Click="OnUriClick">
                                            <TextBlock Margin="0,0,10,0"
										               Text="traceview.codeplex.com"/>
                                        </Hyperlink>
                                     </TextBlock>

                                    <TextBlock Foreground="{StaticResource MetroGray}"
                                               Grid.Row="6"
                                               Grid.ColumnSpan="2"
									           TextWrapping="Wrap"
									           Margin="5,20,5,5"
									           HorizontalAlignment="Left"
                                               FontSize="25"
                                               FontWeight="UltraLight"
                                               FontFamily="Segoe WP"
									           Text="This tool allows you to view log messages from different applications. The viewer provides for search and filtering abilities along with color coding of log messages based on categories like Error, Warning,  Information. The main emphasis is on the ability to filter and categorize log messages. The tool also provides for pinning, copy, email and printing log messages."/>

                                </Grid>
                                
                              
                            </Border>
                                <Border Grid.Row="1"
							        x:Name="brLicense"
							        Visibility="{Binding IsChecked, ElementName=license,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}">

                                <TextBlock Foreground="{StaticResource MetroGray}"
									           TextWrapping="Wrap"
									           FontSize="25"
                                               FontWeight="UltraLight"
                                               FontFamily="Segoe WP"
									           Margin="5,20,5,5"
									           HorizontalAlignment="Left"
									           Text="This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."/>								
							</Border>
						</Grid>
					</Grid>
				</ScrollViewer>

			</Grid>
		</Grid>
		<Grid x:Name="grdOptionsPage"
		      Background="Transparent">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto"/>
				<ColumnDefinition Width="Auto"/>
				<ColumnDefinition/>
				<ColumnDefinition Width="Auto"/>
				<ColumnDefinition Width="Auto"/>
			</Grid.ColumnDefinitions>
            
			<controls:ImageButton HorizontalAlignment="Left"
			                      VerticalAlignment="Top"
			                      Margin="5,4,5,5"
			                      Width="40"
			                      Height="40"
			                      Click="OnBtnSettingsBackClicked"
			                      DefaultImageSource="{StaticResource Back}"
			                      MouseOverImageSource="{StaticResource Back}"/>
            
			<Grid Grid.Column="1">
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="15"/>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="20"/>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="15"/>
					<RowDefinition Height="Auto"/>
					<RowDefinition/>
				</Grid.RowDefinitions>
				<TextBlock Text="recent items"
				           Foreground="{StaticResource MetroGray}"
				           FontWeight="Light"
				           Margin="5,40,5,5"
				           FontSize="40"/>
				<TextBlock Text="max number of items that is viewed in recent items list"
				           Foreground="{StaticResource MetroWhite}"
				           FontWeight="Light"
				           Margin="10,0,0,0"
				           Visibility="{Binding IsMouseOver,ElementName=brMaxItems,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
				           Grid.Row="1"
				           FontSize="11"/>
				<TextBlock Text="max persistence time"
				           Foreground="{StaticResource MetroWhite}"
				           FontWeight="Light"
				           Margin="10,0,0,0"
				           Visibility="{Binding IsMouseOver,ElementName=brTime,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
				           Grid.Row="1"
				           FontSize="11"/>
				<StackPanel Orientation="Horizontal"
				            Margin="15"
				            Grid.Row="2">
					<Border Background="{StaticResource BlackGradientBrush}"
					        BorderThickness=".6"
					        x:Name="brMaxItems"
					        Padding="5,10,10,2"
					        BorderBrush="{StaticResource MetroGray}">
						<StackPanel HorizontalAlignment="Left">
							<TextBlock Text="max items"
							           Foreground="{StaticResource MetroWhite}"
							           FontWeight="Regular"
							           Margin="5"
							           FontSize="18"/>
							<TextBox Foreground="White"
							         Background="Transparent"
							         SelectionBrush="#FFFF7201"
							         CaretBrush="White"
							         Margin="10"
							         Text="{Binding MaxItems,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
							         TextWrapping="WrapWithOverflow"
							         BorderBrush="{StaticResource MetroGray}"
							         BorderThickness=".2"/>
						</StackPanel>
					</Border>
					<Border Background="{StaticResource BlackGradientBrush}"
					        BorderThickness=".6"
					        Margin="10"
					        x:Name="brTime"
					        Padding="5,10,10,0"
					        BorderBrush="{StaticResource MetroGray}">
						<StackPanel HorizontalAlignment="Stretch">
							<TextBlock Text="duration"
							           Foreground="{StaticResource MetroWhite}"
							           FontWeight="Regular"
							           Margin="5"
							           FontSize="18"/>
							<StackPanel Orientation="Horizontal">
								<TextBox Foreground="White"
								         Background="Transparent"
								         SelectionBrush="#FFFF7201"
								         CaretBrush="White"
								         Margin="10"
								         Width="80"
								         Text="{Binding MaxDuration,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
								         TextWrapping="WrapWithOverflow"
								         BorderBrush="{StaticResource MetroGray}"
								         BorderThickness=".2"/>
								<TextBlock Text="min"
								           Foreground="{StaticResource MetroGray}"
								           FontWeight="Light"
								           Margin="5"
								           HorizontalAlignment="Left"
								           VerticalAlignment="Center"
								           FontSize="14"/>
							</StackPanel>

						</StackPanel>
					</Border>
				</StackPanel>
				<TextBlock Text="notification"
				           Foreground="{StaticResource MetroGray}"
				           FontWeight="Light"
				           Grid.Row="4"
				           Margin="5,40,5,5"
				           FontSize="40"/>
				<TextBlock Text="turn on/off popup notifications"
				           Foreground="{StaticResource MetroWhite}"
				           FontWeight="Light"
				           Margin="10,0,0,0"
				           Visibility="{Binding IsMouseOver,ElementName=brNotifications,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
				           Grid.Row="5"
				           FontSize="11"/>
				<Border Background="{StaticResource BlackGradientBrush}"
				        BorderThickness=".6"
				        Grid.Row="6"
				        Margin="15,5,15,15"
				        x:Name="brNotifications"
				        Padding="5,10,10,2"
				        BorderBrush="{StaticResource MetroGray}">
					<StackPanel HorizontalAlignment="Left">
						<CheckBox Content="show notifications"
						          IsChecked="{Binding CanShowNotification,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
					</StackPanel>
				</Border>

			</Grid>
            
			<Grid Grid.Column="2">
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto"/>
                    <RowDefinition/>                    
				</Grid.RowDefinitions>
				<TextBlock Text="config profiles"
 				           Foreground="{StaticResource MetroGray}"
				           FontWeight="Light"
				           Margin="60,40,5,5"
				           FontSize="40"/>
                <Grid Grid.Row="1" x:Name="grdWizard" Visibility="Collapsed">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="22"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock Text="input parameters"
				           Foreground="{StaticResource MetroWhite}"
				           FontWeight="Light"
				           Margin="65,0,0,5"
				           Visibility="{Binding IsMouseOver,ElementName=step1,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"				           
				           FontSize="11"/>
                    <TextBlock Text="generate "
				           Foreground="{StaticResource MetroWhite}"
				           FontWeight="Light"
				           Margin="65,0,0,5"
				           Visibility="{Binding IsMouseOver,ElementName=step2,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"				        
				           FontSize="11"/>
                    <TextBlock Text="my profiles"
				           Foreground="{StaticResource MetroWhite}"
				           FontWeight="Light"
				           Margin="65,0,0,5"
				           Visibility="{Binding IsMouseOver,ElementName=CloseWizard,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"				        
				           FontSize="11"/>
                    <Grid Grid.Row="1"
				      Margin="60,4,4,4">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>                        
                        <controls:ImageButton DefaultImageSource="{StaticResource ShowProfile}"
					                           MouseOverImageSource="{StaticResource ShowProfile}"					                          
					                           x:Name="CloseWizard"
                                               Width="24"
                                               Height="24"
					                           Margin="0,0,10,0"/>
                        <controls:ImageRadioButton DefaultImageSource="{StaticResource BlankCircleG}"
					                           MouseOverImageSource="{StaticResource BlankCircle}"
					                           GroupName="steps"
					                           Grid.Column="1"
					                           x:Name="step1"
					                           Margin="10,0,10,0"
                                               Focusable="False"
                                               IsChecked="True"
					                           Style="{StaticResource NumberImageRadioButton}"
					                           Content="1"/>
                        <controls:ImageRadioButton DefaultImageSource="{StaticResource BlankCircleG}"
					                           MouseOverImageSource="{StaticResource BlankCircle}"
					                           GroupName="steps"
					                           Grid.Column="2"
					                           Margin="10,0,10,0"
					                           x:Name="step2"
                                               Focusable="False"
					                           Style="{StaticResource NumberImageRadioButton}"
					                           Content="2"/>                        
                        <Border Grid.Column="1"
                                Grid.ColumnSpan="3"
                                HorizontalAlignment="Stretch"
                                Background="Black"
                                VerticalAlignment="Stretch"
                                Opacity="0"/>
                    </Grid>                  
                    <Border Grid.Row="2"
				        Margin="65,20,20,20"
				        Background="{StaticResource BlackGradientBrush}"
                        Visibility="{Binding IsChecked,ElementName=step1,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
				        BorderBrush="{StaticResource MetroGray}"
				        BorderThickness=".6">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>                                
                                <RowDefinition Height="Auto"/>
                                <RowDefinition/>
                                <RowDefinition Height="Auto"/>                               
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>                                
                                <ColumnDefinition/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="config file path"
							           Foreground="{StaticResource MetroWhite}"
							           FontWeight="Regular"
							           Margin="5"
							           FontSize="18"/>
                            <TextBox Foreground="White"
                                     Grid.Row="1"
							         Background="Transparent"
							         SelectionBrush="#FFFF7201"
							         CaretBrush="White"
							         Margin="10"
                                     x:Name="txtConfigPath"
                                     Text="{Binding NewProfile.ConfigPath,Mode=TwoWay}"
							         TextWrapping="WrapWithOverflow"
							         BorderBrush="{StaticResource MetroGray}"
							         BorderThickness=".2"/>
                            <controls:ImageButton DefaultImageSource="{StaticResource Parent}"
					                           MouseOverImageSource="{StaticResource Parent}"					                          
					                           x:Name="btnOpenFile"
                                               Width="23"
                                               Height="22"
                                               Grid.Row="1"
                                               Grid.Column="1"
                                               Click="OnBtnOpenFileDialogClick"
					                           Margin="0,0,10,0"					                         
					                           Content="1"/>
                            <TextBlock Text="listeners:"
							           Foreground="{StaticResource MetroWhite}"
							           FontWeight="Regular"
							           Margin="5"
                                       Grid.Row="2"                                       
							           FontSize="18"/>
                            <ListBox Grid.Row="3"
                                     Background="Transparent"
						             BorderBrush="Transparent"
						             BorderThickness="0"
						             Margin="5"
                                     Grid.ColumnSpan="2"
                                     VerticalAlignment="Stretch"
                                     HorizontalAlignment="Stretch"
                                     HorizontalContentAlignment="Stretch"
                                     SelectedItem="{Binding NewProfile.Listener}"
                                     ItemTemplate="{StaticResource ListenerItemTemplate}"
                                     ItemsSource="{Binding Listeners}"
						             ScrollViewer.CanContentScroll="False"
						             ScrollViewer.HorizontalScrollBarVisibility="Auto"/>
                        <Grid  Grid.Row="4"
                               HorizontalAlignment="Center"
                               VerticalAlignment="Bottom"
                               Grid.ColumnSpan="2">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="15"/>
                                </Grid.RowDefinitions>
                                    <controls:ImageButton DefaultImageSource="{StaticResource NextWiz}"
					                           MouseOverImageSource="{StaticResource NextWiz}"					                          
					                           x:Name="BtnNextStep"  
                                               HorizontalAlignment="Center"
                                               Click="OnBtnWizardNextClick"
                                               Width="24"
                                               Height="24"
					                           />
                                <TextBlock Text="next"    
                                           Grid.Row="1"
                                           HorizontalAlignment="Center"
                                           Visibility="{Binding IsMouseOver,ElementName=BtnNextStep,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
							               Foreground="{StaticResource MetroWhite}"
							               FontWeight="UltraLight"
                                           FontFamily="Segoe WP"
							               FontSize="12"/>
                            </Grid>
                        </Grid>
                    </Border>
                    <Border Grid.Row="2"
				        Margin="65,20,20,20"
				        Background="{StaticResource BlackGradientBrush}"
                        Visibility="{Binding IsChecked,ElementName=step2,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
				        BorderBrush="{StaticResource MetroGray}"
				        BorderThickness=".6">
                        <Grid>
                            <Grid.RowDefinitions>                              
                                <RowDefinition/>                                
                            </Grid.RowDefinitions>
                            <Viewbox Visibility="{Binding IsGeneratingMode,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
                                     Margin="20"
                                     Width="70"
                                    Height="90"
                             Grid.Row="1"
                             HorizontalAlignment="Center"
                             VerticalAlignment="Center">
                                <StackPanel>
                                    <controls:Spinner HorizontalAlignment="Center"
                             VerticalAlignment="Center"/>
                                <TextBlock Text="generating..."
                                           HorizontalAlignment="Center"
                                       VerticalAlignment="Center"
							           Foreground="{StaticResource MetroGray}"
							           FontWeight="UltraLight"                                      
							           FontSize="60"/>
                                </StackPanel>
                            </Viewbox>
                            <Grid Visibility="{Binding IsGeneratingMode,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Collapsed,FalseMapsTo=Visible}}">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition />
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto" MinHeight="40"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <TextBlock Text="generation output"
							               Foreground="{StaticResource MetroWhite}"
                                           TextWrapping="WrapWithOverflow"
							               FontWeight="Regular"
							               Margin="5"                                         
							               FontSize="16"/>
                                <TextBlock Text=""
							               Foreground="{StaticResource MetroWhite}"
                                           TextWrapping="WrapWithOverflow"
							               FontWeight="Regular"
							               Margin="5"   
                                           Grid.Row="1"
                                           x:Name="txtGenerationOutput"
                                           Background="Black"                                           
                                           VerticalAlignment="Stretch"
                                           HorizontalAlignment="Stretch"
							               FontSize="16"/>
                               
                                <Border Grid.Row="4" Grid.RowSpan="2" x:Name="brYesNo">                                    
                                    <Grid HorizontalAlignment="Stretch"
                                          VerticalAlignment="Bottom">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition/>
                                            <RowDefinition Height="15"/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition/>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <CheckBox x:Name="chkSaveProfile"
                                                  Grid.ColumnSpan="6"
                                                  Content="save as profile"/>
                                        <StackPanel Grid.Row="1" Grid.ColumnSpan="6" Visibility="{Binding IsChecked,ElementName=chkSaveProfile,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}">
                                            <TextBlock Text="profile name"
							                       Foreground="{StaticResource MetroWhite}"
                                                   TextWrapping="WrapWithOverflow"
							                       FontWeight="Regular"							          
                                                   HorizontalAlignment="Left"
                                                   Margin="5"
							                       FontSize="10"/>
                                            <TextBox Foreground="White"
                                                     Grid.Row="1"
							                         Background="Transparent"
							                         SelectionBrush="#FFFF7201"
							                         CaretBrush="White"	
                                                     Margin="5"
                                                     x:Name="txtProfile"
                                                     Text="{Binding NewProfile.Name}"
                                                     HorizontalAlignment="Stretch"                                             
							                         TextWrapping="WrapWithOverflow"
							                         BorderBrush="{StaticResource MetroGray}"
							                         BorderThickness=".2"/>
                                            <TextBlock Text=""
                                                   x:Name="txtValidationMessage"
							                       Foreground="{StaticResource MetroWhite}"
                                                   TextWrapping="WrapWithOverflow"
							                       FontWeight="UltraLight"
                                                   FontFamily="Segoe WP"
                                                   HorizontalAlignment="Left"                                                   
							                       FontSize="9"/>
                                        </StackPanel>
                                                                                
                                        <controls:ImageButton HorizontalAlignment="Center"
			                                              VerticalAlignment="Bottom"	
                                                          Grid.Column="2"
                                                          Grid.Row="2"
                                                          Width="24"
                                                          Height="24"
                                                          x:Name="btnOk"
                                                          Margin="10"
			                                              DefaultImageSource="{StaticResource ProfileW}"
			                                              MouseOverImageSource="{StaticResource ProfileW}"/>
                                        <TextBlock Text="finish"                                     
                                                   Grid.Row="3"
                                                   Grid.Column="2"
                                                   HorizontalAlignment="Center"
                                                   Visibility="{Binding IsMouseOver,ElementName=btnOk,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
							                       Foreground="{StaticResource MetroWhite}"
							                       FontWeight="UltraLight"
                                                   FontFamily="Segoe WP"
							                       FontSize="12"/>                                        
                                        <controls:ImageButton HorizontalAlignment="Center"
			                                                  VerticalAlignment="Bottom"			                     
			                                                  Grid.Column="1"                               
                                                          Width="24"
                                                          Height="24"
                                                          Margin="10"
                                                              Grid.Row="2"
                                                          x:Name="btnPrevious"
                                                          Click="OnBtnWizardPreviousClick"
			                                              DefaultImageSource="{StaticResource PreviousWiz}"
			                                              MouseOverImageSource="{StaticResource PreviousWiz}"/>
                                        <TextBlock Text="back"                                     
                                                   Grid.Row="3"
                                                   Grid.Column="1" 
                                                   HorizontalAlignment="Center"
                                                   Visibility="{Binding IsMouseOver,ElementName=btnPrevious,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
							                       Foreground="{StaticResource MetroWhite}"
							                       FontWeight="UltraLight"
                                                   FontFamily="Segoe WP"
							                       FontSize="12"/>
                                        <controls:ImageButton HorizontalAlignment="Center"
			                                              VerticalAlignment="Bottom"			                     
			                                              Grid.Column="4"                               
                                                          Width="24"
                                                          Height="24"
                                                          Margin="10"
                                                          Grid.Row="2"
                                                          x:Name="btnSaveProfile"
                                                          Visibility="{Binding IsChecked,ElementName=chkSaveProfile,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
                                                          Click="OnBtnSaveProfileClick"
			                                              DefaultImageSource="{StaticResource SaveW}"
			                                              MouseOverImageSource="{StaticResource SaveW}"/>
                                        <TextBlock Text="save"                                     
                                                   Grid.Row="3"
                                                   Grid.Column="4" 
                                                   HorizontalAlignment="Center"
                                                   Visibility="{Binding IsMouseOver,ElementName=btnSaveProfile,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"                                                  
							                       Foreground="{StaticResource MetroWhite}"
							                       FontWeight="UltraLight"
                                                   FontFamily="Segoe WP"
							                       FontSize="12"/>
                                    </Grid>                                                                                                          
                                </Border>                               
                            </Grid>
                        </Grid>
                    </Border>                  
                </Grid>
				
                <Border Grid.Row="1"
                        x:Name="brProfiles"
                        Grid.RowSpan="3"
				        Margin="50,20,19,19"
				        Background="{StaticResource BlackGradientBrush}"
				        BorderBrush="{StaticResource MetroGray}"
				        BorderThickness=".6">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <TextBlock Text="my profiles:"
							           Foreground="{StaticResource MetroWhite}"
							           FontWeight="Regular"
							           Margin="5"
							           FontSize="18"/>
                        <ListBox Grid.Row="1" 
                                 Background="Transparent"
						         BorderBrush="Transparent"
						         BorderThickness="0"
						         Margin="5"
                                 ItemsSource="{Binding Profiles}"
                                 SelectionMode="Multiple"
						         ScrollViewer.CanContentScroll="False"
						         ScrollViewer.HorizontalScrollBarVisibility="Auto"/>
                        <Grid Grid.Row="2" x:Name="grdActions"
                              HorizontalAlignment="Center">
                            <Grid.RowDefinitions>
                                <RowDefinition />
                                <RowDefinition Height="15"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition Width="50"/>
                                <ColumnDefinition Width="50"/>
                                <ColumnDefinition Width="50"/>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <controls:ImageButton HorizontalAlignment="Center"
			                      VerticalAlignment="Bottom"			                     
			                      Grid.Column="1"
                                  x:Name="btnLoadProfile"
                                  Width="24"
                                  Height="24"
                                  Click="OnLoadProfilesClick"
			                      DefaultImageSource="{StaticResource ProfileW}"
			                      MouseOverImageSource="{StaticResource ProfileW}"/>
                            <TextBlock Text="load"
                                       Grid.Column="1"
                                       Grid.Row="1"
                                       HorizontalAlignment="Center"
                                       Visibility="{Binding IsMouseOver,ElementName=btnLoadProfile,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
							           Foreground="{StaticResource MetroWhite}"
							           FontWeight="UltraLight"
                                       FontFamily="Segoe WP"
							           FontSize="12"/>
                            <controls:ImageButton HorizontalAlignment="Center"
			                      VerticalAlignment="Bottom"			                     
			                      Grid.Column="2"
                                  x:Name="btnAdd"
                                  Width="24"
                                  Height="24"
                                  Click="OnBtnAddNewProfileClick"
			                      DefaultImageSource="{StaticResource AddW}"
			                      MouseOverImageSource="{StaticResource AddW}"/>
                            <TextBlock Text="add"
                                       Grid.Column="2"
                                       Grid.Row="1"
                                       HorizontalAlignment="Center"
                                       Visibility="{Binding IsMouseOver,ElementName=btnAdd,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
							           Foreground="{StaticResource MetroWhite}"
							           FontWeight="UltraLight"
                                       FontFamily="Segoe WP"
							           FontSize="12"/>
                            <controls:ImageButton HorizontalAlignment="Center"
			                      VerticalAlignment="Bottom"			                     
			                      Grid.Column="3"
                                  x:Name="btnDelete"
                                  Width="24"
                                  Height="24"
                                  Click="OnBtnDeleteProfilesClick"
			                      DefaultImageSource="{StaticResource DeleteProfileW}"
			                      MouseOverImageSource="{StaticResource DeleteProfileW}"/>
                            <TextBlock Text="delete"
                                       Grid.Column="3"
                                       Grid.Row="1"
                                       HorizontalAlignment="Center"
                                       Visibility="{Binding IsMouseOver,ElementName=btnDelete,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
							           Foreground="{StaticResource MetroWhite}"
							           FontWeight="UltraLight"
                                       FontFamily="Segoe WP"
							           FontSize="12"/>
                            
                        </Grid>
                        
                    </Grid>
                </Border>
			</Grid>

			<Grid Grid.Column="3">
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto"/>
					<RowDefinition/>
				</Grid.RowDefinitions>
				<ScrollViewer HorizontalScrollBarVisibility="Disabled"
				              Grid.Row="1">
					<Grid>
						<Grid.RowDefinitions>
							<RowDefinition Height="15"/>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="15"/>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="15"/>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="15"/>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="15"/>
							<RowDefinition Height="Auto"/>
						</Grid.RowDefinitions>

						<TextBlock Text="default"
						           Foreground="{StaticResource MetroWhite}"
						           FontWeight="Light"
						           Margin="6,0,0,0"
						           HorizontalAlignment="Center"
						           Visibility="{Binding IsMouseOver,ElementName=brDefault,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
						           FontSize="11"/>
						<controls:ImageRadioButton GroupName="ThemeColor"
						                           Margin="10,0,10,10"
						                           x:Name="brDefault"
						                           Tag="default"
						                           Checked="ThemeColorChecked"
						                           Style="{StaticResource ThemeImageRadioButton}"
						                           Grid.Row="1"
						                           IsChecked="True">
							<Rectangle Fill="{StaticResource toggleBtnBrush}"/>
						</controls:ImageRadioButton>
						<TextBlock Text="blue"
						           Foreground="{StaticResource MetroWhite}"
						           FontWeight="Light"
						           Margin="10,0,0,0"
						           HorizontalAlignment="Center"
						           Visibility="{Binding IsMouseOver,ElementName=brBlue,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
						           Grid.Row="2"
						           FontSize="11"/>
						<controls:ImageRadioButton GroupName="ThemeColor"
						                           Margin="10,0,10,10"
						                           x:Name="brBlue"
						                           Tag="blue"
						                           Checked="ThemeColorChecked"
						                           Style="{StaticResource ThemeImageRadioButton}"
						                           Grid.Row="3">
							<Rectangle Fill="{StaticResource MetroBlue}"/>
						</controls:ImageRadioButton>
						<TextBlock Text="pink"
						           Foreground="{StaticResource MetroWhite}"
						           FontWeight="Light"
						           Margin="10,0,0,0"
						           HorizontalAlignment="Center"
						           Visibility="{Binding IsMouseOver,ElementName=brPink,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
						           Grid.Row="4"
						           FontSize="11"/>
						<controls:ImageRadioButton GroupName="ThemeColor"
						                           Margin="10,0,10,10"
						                           x:Name="brPink"
						                           Tag="pink"
						                           Checked="ThemeColorChecked"
						                           Style="{StaticResource ThemeImageRadioButton}"
						                           Grid.Row="5">
							<Rectangle Fill="{StaticResource MetroPink}"/>
						</controls:ImageRadioButton>
						<TextBlock Text="green"
						           Foreground="{StaticResource MetroWhite}"
						           FontWeight="Light"
						           Margin="10,0,0,0"
						           HorizontalAlignment="Center"
						           Visibility="{Binding IsMouseOver,ElementName=brGreen,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
						           Grid.Row="6"
						           FontSize="11"/>
						<controls:ImageRadioButton GroupName="ThemeColor"
						                           Margin="10,0,10,10"
						                           x:Name="brGreen"
						                           Tag="green"
						                           Checked="ThemeColorChecked"
						                           Style="{StaticResource ThemeImageRadioButton}"
						                           Grid.Row="7">
							<Rectangle Fill="{StaticResource MetroGreen}"/>
						</controls:ImageRadioButton>
						<TextBlock Text="yellow"
						           Foreground="{StaticResource MetroWhite}"
						           FontWeight="Light"
						           Margin="10,0,0,0"
						           HorizontalAlignment="Center"
						           Visibility="{Binding IsMouseOver,ElementName=brYellow,Converter={ui:BoolToVisibilityConverter TrueMapsTo=Visible,FalseMapsTo=Collapsed}}"
						           Grid.Row="8"
						           FontSize="11"/>
						<controls:ImageRadioButton GroupName="ThemeColor"
						                           Margin="10,0,10,10"
						                           x:Name="brYellow"
						                           Tag="yellow"
						                           Checked="ThemeColorChecked"
						                           Style="{StaticResource ThemeImageRadioButton}"
						                           Grid.Row="9">
							<Rectangle Fill="{StaticResource MetroYellow}"/>
						</controls:ImageRadioButton>
					</Grid>
				</ScrollViewer>
				<StackPanel Orientation="Horizontal">
					<TextBlock Text="theme"
					           Foreground="{StaticResource MetroGray}"
					           FontWeight="Light"
					           Margin="40,40,40,10"
					           FontSize="40"/>
					<controls:ColourSlider x:Name="Slider"
					                       Height="80"
					                       Margin="5,0,0,5"
					                       SelectionStart="0.5"
					                       BorderBrush="{StaticResource MetroWhite}"
					                       BorderThickness=".5"
					                       SecondaryColor="{Binding ThemeColor}"/>
				</StackPanel>
			</Grid>

		</Grid>
		<Grid x:Name="grdBlank">
			<Grid.Background>
				<RadialGradientBrush>
					<GradientStop Color="Black"
					              Offset="1"/>
					<GradientStop Color="{Binding ElementName=Slider, Path=SelectedColour,FallbackValue=Black}"
					              Offset="0.009"/>
				</RadialGradientBrush>
			</Grid.Background>
		</Grid>
	</Grid>
</UserControl>